package com.hzit.mapper;

import com.hzit.entity.Student;
import com.hzit.entity.StudentVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface StudentMapper {
	List<Student> findAll();

	List<Student> search(StudentVo studentVo);

	@Insert("insert into student values(null,#{sname},#{sex},#{age},#{addr},#{cid})")
	void add(Student student);

	@Update("update student set sname=#{sname},sex=#{sex},age=#{age},addr=#{addr},cid=#{cid} where sid=#{sid}")
	void update(Student student);

	@Delete("delete from student where sid=#{sid}")
	void delete(String sid);
}
